home *** CD-ROM | disk | FTP | other *** search
/ CD Ware Multimedia 1995 May / cd Ware (Juegos) Epimundo.iso / DOS / C / TCCLIB.ZIP / TODDATE.C < prev    next >
Encoding:
C/C++ Source or Header  |  1990-02-07  |  358 b   |  17 lines

  1. #include <stdio.h>
  2. #include <time.h>
  3.  
  4. unsigned Julian( char *datestr );
  5.  
  6. unsigned TodaysDate()
  7. {
  8.     struct tm *st, *localtime();
  9.     long prsnt_time;
  10.     char tim[10];
  11.  
  12.     time( &prsnt_time );
  13.     st = localtime( &prsnt_time );
  14.     sprintf( tim, "%02d-%02d-%02d", st->tm_mon + 1, st->tm_mday, st->tm_year );
  15.     return( Julian( tim ) );
  16. }
  17.